<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">	
	<title>报表</title>
	<link rel="stylesheet" href='<c:url value="/resources/bootstrap/css/bootstrap.min.css"/>'>
	<link rel="stylesheet" href='<c:url value="/resources/css/bootstrap-datetimepicker.css"/>'>	
	<link rel="stylesheet" href='<c:url value="/resources/css/select2.css"/>'>

	<link rel="stylesheet" href='<c:url value="/resources/css/fastTempalte.css"/>'>
	<link rel="stylesheet" href='<c:url value="/resources/css/google_doc.css"/>'>
	<link rel="stylesheet" href='<c:url value="/resources/handsontable/handsontable.full.024.css"/>'>
	<link rel="stylesheet" href='<c:url value="/resources/css/jquery.fancybox.css"/>'>
	<link rel="stylesheet" href='<c:url value="/resources/jquery-ui-bootstrap3/css/jquery-ui-1.10.0.custom.css"/>'/>

	<script src='<c:url value="/resources/js/jquery-1.11.0.min.js"/>'></script>
	<script src='<c:url value="/resources/js/jquery.fancybox.js?v=2.1.5"/>'></script>
	<script src='<c:url value="/resources/bootstrap/js/bootstrap.min.js"/>'></script>
	<script src='<c:url value="/resources/datatable/media/js/jquery.dataTables.min.js"/>'></script>
	
	<script src='<c:url value="/resources/handsontable/rulejs/full/ruleJS.all.full.js"/>'></script>
	
	<script src='<c:url value="/resources/jquery-ui-bootstrap3/js/jquery-ui-1.10.0.custom.min.js"/>'></script>

	<script src='<c:url value="/resources/js/echarts-all.js"/>'></script>	
	<script src='<c:url value="/resources/js/select2.min.js"/>'></script>
	<script src='<c:url value="/resources/js/select2_locale_zh-CN.js"/>'></script>

	<script src='<c:url value="/resources/js/bootstrap-datetimepicker.js"/>'></script>
	<script src='<c:url value="/resources/js/bootstrap-datetimepicker.zh-CN.js"/>'></script>

	<script src='<c:url value="/resources/js/stickUp.js"/>'></script>
	<script src='<c:url value="/resources/ckeditor/ckeditor.js"/>'></script>
	<script src='<c:url value="/resources/js/jquery.jsontotable.js"/>'></script>
	<script src='<c:url value="/resources/js/json2.js"/>'></script>
	<!-- <script src='<c:url value="/resources/js/jquery.print.js"/>'></script>-->
	<script src='<c:url value="/resources/js/jquery.hotkeys.js"/>'></script>
	
	<script src='<c:url value="/resources/myjs/util.js"/>'></script>
	<script src='<c:url value="/resources/myjs/dateUtil.js"/>'></script>
	<!-- <script src='<c:url value="/resources/myjs/freeTable.js"/>'></script>-->
	
	<!-- chart脚本 -->
	<script src='<c:url value="/resources/chart_option/line.js"/>'></script>
	<script src='<c:url value="/resources/chart_option/bar.js"/>'></script>
	<script src='<c:url value="/resources/chart_option/doubleline.js"/>'></script>
	<script src='<c:url value="/resources/chart_option/newline.js"/>'></script>
	<!--[if lt IE 9]>
	<script src="<c:url value="/resources/ckeditor/html5shiv.min.js"/>"></script>
	<![endif]-->
	<script type="text/javascript">
		var ftChart;
		var currentSessionId = '${currentSessionId}';
		var pageId = '${pageId}';
		var tempEditorName = 'tempEditorData';
		var tempTableArea = 'table_area';
		var ckHeight = ${ckHeight};
		var $_doc = $(document);
		var ftPageTitle = '${pageTitle}';
		// 存放时间、日期类型参数
		var dateTypeArgs = [];
		var scriptDataTypeArgs = [];
	</script>
	<script src='<c:url value="/resources/myjs/fastTemplate.js"/>'></script>
	<script src='<c:url value="/resources/myjs/ft_pull_useparam.js"/>'></script>
	<script src='<c:url value="/resources/myjs/ft_query_useparam.js"/>'></script>
	<script src='<c:url value="/resources/myjs/ft_exportreport.js"/>'></script>
</head>
<body oncontextmenu="return false;">
	<div class='row' style='width : 100%;'>
		<div class='col-md-1' style='width:50px;float:left;' id='pageLogo'>
			<div style='width:40px;height:45px;background-color:rgb(66, 133, 244);cursor: pointer;' title="选项">
				<div id="docs-branding-logo" style="background: url(<c:url value='/resources/images/logo.svg'/>) center no-repeat;height: 45px;"></div>
			</div>
		</div>
		<div class='col-md-5' style='width:auto;float:left;'>
			<div class='navbar-title'>
				<div class='navbar-title-span' style='float:left;' page-title="${pageTitle}" title="修改标题"></div>
			</div>
		</div>
		<div class='col-md-5' style='width:auto;float:right;top:17px'>			
			<button id='pageExportBtn' class="btn btn-default btn-xs" style="padding:2px 12px;" type="button">导出</button>			
			<button id='pageSearchBtn' class="btn btn-default btn-xs" style="padding:2px 12px;" type="button">查询</button>
			<button id='savePageBtn' class="btn btn-primary btn-xs" style="padding:2px 12px;background-color:#4285F4;border-color:#4285F4;" type="button">保存</button>
		</div>
	</div>
	<div id='myMenu' class="goog-menu docs-homescreen-leftnavbar-menu" style="top:0px;left: -240px;position: absolute;">
		<div class="goog-menuitem docs-homescreen-leftnavbar-menuheader">
			<div class="goog-menuitem-content">
				<div class="docs-homescreen-leftnavbar-captioniconblack">
					<div class="docs-homescreen-icon docs-homescreen-icon-medium">
						<div class="docs-homescreen-img docs-homescreen-menu-black-24"></div>
					</div>
				</div>
				<div class="docs-homescreen-leftnavbar-captiontext">文档</div>
			</div>
		</div>
		<div class="goog-menuitem docs-homescreen-leftnavbar-menuitem">
			<div id='pullUseArg' class="goog-menuitem-content">
				<div class="docs-homescreen-leftnavbar-menuitem-content">
					<div class="docs-homescreen-leftnavbar-menuitem-icon">
						<div class="docs-homescreen-icon  glyphicon glyphicon-cog">
						</div>
					</div>
					<div class="docs-homescreen-leftnavbar-menuitem-text">设置参数</div>
				</div>
			</div>
		</div>
		<div class="goog-menuitem docs-homescreen-leftnavbar-menuitem">
			<div id='queryPage' class="goog-menuitem-content">
				<div class="docs-homescreen-leftnavbar-menuitem-content">
					<div class="docs-homescreen-leftnavbar-menuitem-icon">
						<div class="docs-homescreen-icon glyphicon glyphicon-search">
						</div>
					</div>
					<div class="docs-homescreen-leftnavbar-menuitem-text">查询页面</div>
				</div>
			</div>
		</div>
		<div class="goog-menuitem docs-homescreen-leftnavbar-menuitem google-menuitem-highlight">
			<div id='export' class="goog-menuitem-content">
				<div class="docs-homescreen-leftnavbar-menuitem-content">
					<div class="docs-homescreen-leftnavbar-menuitem-icon">
						<div class="docs-homescreen-icon glyphicon glyphicon-export">
						</div>
					</div>
					<div class="docs-homescreen-leftnavbar-menuitem-text">导出文件</div>
				</div>
			</div>
		</div>
		
		<div class="goog-menuitem docs-homescreen-leftnavbar-menuitem">
			<div id='scanPage' class="goog-menuitem-content">
				<div class="docs-homescreen-leftnavbar-menuitem-content">
					<div class="docs-homescreen-leftnavbar-menuitem-icon">
						<div class="docs-homescreen-icon glyphicon glyphicon-eye-open">
						</div>
					</div>
					<div class="docs-homescreen-leftnavbar-menuitem-text icon-text">浏览页面</div>
				</div>
			</div>
		</div>

		<div id='menuIconOk' class="docs-homescreen-leftnavbar-menuitem-icon" style="display:none;">
			<div class="docs-homescreen-icon glyphicon glyphicon-ok" style="margin-bottom:6px;font-size:14px;">
			</div>
		</div>
	</div>
	
	<div id="top" style="width: 100%;border-top-width: 0px;border-top-style: solid;border-top-color: rgb(217, 217, 217);display:block;"></div>
	
	<div id="msgBoxDiv" style="position: absolute; width: 100%; height: 24px; top: 25px; text-align: center;display: none;">
		<span class="msg">
			<span class='txt'></span>
			<img id='loadingGif' src='<c:url value="/resources/images/ajax-loader.gif"/>' style='display:none;' />
		</span>
		<span class='closeMsg'>×</span>
	</div>
	
	<div style='display: none;'>
		<form id='exportForm' method="post">
			<input type="text" name='pageId'>
			<input type="text" name='pageWidth'>
			<input type="text" name='pageDirect'>
			<textarea name='pageHtml'></textarea>
			<textarea name='smartTableJsons'></textarea>
			<textarea name='chartOptions'></textarea>
		</form>
		
		<form id='exportExcelForm' method="post">
			<input type="text" name='dataType'>
			<textarea name='tableData'></textarea>
		</form>

		<span id='widgetExcelIcon' class='excel_icon_export cke_reset cke_widget_drag_handler_container'  style="display: block;">
			<img class="excel_icon_export_img cke_reset cke_widget_drag_handler" data-cke-widget-drag-handler="1" src="" width="16" title="导出Excel" height="16">
		</span>

		<div id='pageTitle'>			
			<div class="form-group">
				<label class="control-label" style="font-size: 15px;font-weight: lighter;">修改文档名称：</label>
				<input type="text" class="form-control input-sm" id="title_change">
			</div>
		</div>
		<div id='pageParams'>
			<span class="ui-helper-hidden-accessible"><input type="text"/></span>
			<div class="form-inline" style="max-height:200px;overflow-y: auto;">			
			</div>
		</div>
		<div>
			<div id='textDiv'>
				<div class="form-group">
					<label class="control-label param_name"></label>
					<input type="text" class="form-control input-sm param_val">
				</div>
			</div>
			<div id='dateDiv'>
				<div class="form-group">
					<label class="control-label param_name"></label>
					<div class="input-group date">
						<input type="text" class="form-control input-sm param_val">
						<span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
					</div>
				</div>
			</div>
			<div id='downListDiv'>
				<div class="form-group">
					<label class="control-label param_name"></label>
					<select class="form-control input-sm param_val downlist">
					</select>
				</div>
			</div>
			<div id='autoCompleteDiv'>
				<div class="form-group">
					<label class="control-label param_name"></label>
					<input type="text" class="autocomplete param_val" placeholder="输入站码或站名" style="width:216px">
				</div>
			</div>
			<div id='numberDiv'>
				<div class="form-group">
					<label class="control-label param_name"></label>
					<input type="number" class="form-control param_val" style="width:90px;" min="1" max="9999">
				</div>
			</div>
		</div>
		<div id='exportReport'>
			<div class="form-inline" style='margin-top:3px;'>
				<div class="form-group">
					<label class="control-label">页面大小：</label>
					<input id="pageWidth" type="text" class="form-control input-sm" style="width:80px">（范围：960~1200）
				</div>
				<div class="form-group">
					<label class="control-label param_name">页面方向：</label>
					<select class="form-control input-sm" id="pageDirect">
						<option value="lan">纵向</option>
						<option value="por">横向</option>
					</select>
					<label class="control-label">类型：</label>
					<select class="form-control input-sm" id="pageType">
						<option value="pdf">PDF</option>
						<option value="docx">WORD</option>
					</select>
				</div>
			</div>
		</div>
		<div id='freeTableDiv'>
			<div id='handsontable'></div>
		</div>
		<div id='expressionDiv'></div>

		<div id='useArgConfDiv'>
			<div style="float:right;">
				<div class="form-group">
					<button type="button" id='clearUseArg' class="btn btn-default btn-ms">清除</button>
					<button type="button" id='rmUseArg' class="btn btn-default btn-ms" >删除</button>
				</div>
			</div>
			<div class="form-inline" style="height: 150px;overflow-y: auto;width: 100%;">
				<table class='table table-condensed useargconf-list'>
					<thead>
						<tr>
							<th style='width:150px'>名称</th>
							<th>类型</th>
							<th>参数值</th>
							<th>显示</th>
							<!-- <th>保存方式</th> -->
							<th>排序</th>
						</tr>
					</thead>
					<tbody>
					</tbody>
				</table>
			</div>
			<div class="form-inline">
				<div class="form-group">
					<label for="argName">名称：</label>
					<input type="text" class="form-control input-sm" style='width:120px' id="argName"/>
				</div>
				<div class="form-group">
					<label for="argType">类型：</label>
					<select class="form-control input-sm" id="argType" style="width:80px">
						<option value="TEXT">文本</option>
						<option value="DAY">日期</option>
						<option value="DATETIME">时间</option>
						<option value="DOWNLIST">列表</option>
						<option value="SINGLESITE">单站</option>
						<option value="SITEGROUP">多站</option>
					</select>
				</div>
				<div class="form-group">
					<label class="checkbox-inline">
						<input type="checkbox" id="isShow" value="isShow" checked="true"> 显示
					</label>
					<label class="checkbox-inline" style="display:none;">
						<input type="checkbox" id="isSQL" value="isSQL"> SQL
					</label>
				</div>
				<div class="form-group" style='float:right;'>
					<button type="button" id='subUseArg' class="btn btn-default btn-ms">确定</button>
				</div>
			</div>
			<div style='margin:5px 0px' class="form-group">
				<label for="argType">参数：</label>
				<!-- <input type="text" class="form-control input-sm" id='argValue' /> -->
				<textarea class="form-control" rows="4" id='argValue'></textarea>
			</div>
			<div class="form-group" id='emptyBottom' style="height:40px;display:none;">
				
			</div>
		</div>
	</div>
	
	<div class="editorDiv">
		<div id="editorArea" style="margin: auto">
			<textarea id="editor" name="editor" contenteditable="true">${pageText}</textarea>
		</div>
	</div>
	
	<div id="printDiv"></div>
</body>
</html>
